package edu.neumont.App;

import java.io.ObjectInputStream;

import edu.neumont.entities.Entities;
import edu.utility.xuggle.MyPicture;
import android.app.Activity;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class PictureActivity extends Activity{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.picture);
		
		try{
			ObjectInputStream ois = new ObjectInputStream(Entities.network.getSocket().getInputStream());
			ImageView view = (ImageView)findViewById(R.id.pictureView);
			MyPicture picture = (MyPicture)ois.readObject();
		    view.setImageBitmap(BitmapFactory.decodeByteArray(picture.getBytes(), 0, picture.getBytes().length));  
		}catch(Exception ex){}
	}
}
